package com.ruoyi.match.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author sjz
 * @Date 2023/11/8 17:44
 * @Desc
 */
@Getter
@AllArgsConstructor
public enum HalfEnum {
    SS("ss","胜胜"),
    SP("sp","胜平"),
    SF("sf","胜负"),
    PS("ps","平胜"),
    PP("pp","平平"),
    PF("pf","平负"),
    FS("fs","负胜"),
    FP("fp","负平"),
    FF("ff","负负"),
        ;


    private String index;
    private String code;



    public static HalfEnum getHalfByMatchHalfResult(String matchHalfResult) {
        for (HalfEnum value : HalfEnum.values()) {
            if(value.index.equals(matchHalfResult)){
                return value;
            }
        }
        return null;
    }

}
